package com.dingli.framework.controller;

import com.dingli.framework.util.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin("*")
@RestController
@Api(tags = "测试相关")
@RequestMapping("/test")
public class TestController {

    @GetMapping("/exception")
    @ApiOperation("异常处理测试")
    public Response<Object> exception() {
        int x = 3 / 0;
        return new Response<>(200, "success");
    }

}
